<?php

class Poll_Form_Add extends Nuo_Form
{
	function init()
	{
		$this -> addChild('text', 'question', array('label' => 'Question'));

		$this -> addChild('Multigroup', 'answer', array(
			'label' => 'Answer',
			'isMulti' => 1,
			'minNumber' => 2,
			'maxNumber' => 4,
		));

		$answer = $this -> answer;

		$answer -> addChild('text', 'label', array());
		$answer -> addChild('hidden', 'sort_order', array('value' => 0));
		$answer -> addChild('hidden', 'answer_id', array('value' => 0));

		$this -> addChild('group', '_footer');

		$this -> _footer -> addChild('submit', '_submit');
	}

}
